﻿using System;
using System.Runtime.InteropServices;

namespace Microsoft.Xna.Framework.Graphics
{
    /// <summary>
    /// Describes the parameters to use when initializing a new instance of a texture.
    /// </summary>
    [Serializable]
    [StructLayout(LayoutKind.Sequential)]
	[Obsolete]
    public struct TextureCreationParameters
    {
        private int m_Width;
        private int m_Height;
        private int m_Depth;
        private int m_MipLevels;
        private SurfaceFormat m_Format;
        private ResourceManagementMode m_ResourceManagementMode;
        private ResourceUsage m_ResourceUsage;
        private Color m_ColorKey;
        private static TextureCreationParameters m_Default;

        #region Properties
        /// <summary>
        /// Gets or sets the color value to replace with transparent black.
        /// </summary>
        public Color ColorKey
        {
            get { return m_ColorKey; }
            set { m_ColorKey = value; }
        }

        /// <summary>
        /// Gets the default texture creation parameters.
        /// </summary>
        public static TextureCreationParameters Default
        {
            get { return m_Default; }
        }

        /// <summary>
        /// Gets or sets the depth to create the Texture with.
        /// </summary>
        public int Depth
        {
            get { return m_Depth; }
            set { m_Depth = value; }
        }

        /// <summary>
        /// Gets or sets the format of the texture to be created.
        /// </summary>
        public SurfaceFormat Format
        {
            get { return m_Format; }
            set { m_Format = value; }
        }

        /// <summary>
        /// Gets or sets the height to create a Texture with.
        /// </summary>
        public int Height
        {
            get { return m_Height; }
            set { m_Height = value; }
        }

        /// <summary>
        /// Gets or sets the number of mip levels to create a Texture with.
        /// </summary>
        public int MipLevels
        {
            get { return m_MipLevels; }
            set { m_MipLevels = value; }
        }

		/// <summary>
		/// 
		/// </summary>
        public int Width 
        { 
            get { return m_Width; } 
            set { m_Width = value; } 
        }

		/// <summary>
		/// 
		/// </summary>
        public ResourceManagementMode ResourceManagementMode 
        { 
            get { return m_ResourceManagementMode; } 
            set { m_ResourceManagementMode = value; } 
        }

		/// <summary>
		/// 
		/// </summary>
        public ResourceUsage ResourceUsage
        {
            get { return m_ResourceUsage; }
            set { m_ResourceUsage = value; }
        }
        #endregion

        #region Constructor
        /// <summary>
        ///  Reference page contains links to related code samples.
        /// </summary>
        /// <param name="width">Width of the texture.</param>
        /// <param name="height">Height of the texture.</param>
        /// <param name="depth">Depth of the texture.</param>
        /// <param name="mipLevels">Number of mip levels in the texture.</param>
        /// <param name="format">Format of the texture.</param>
        /// <param name="resourceUsage"> A set of options identifying the behaviors of this texture resource.</param>
        /// <param name="resourceManagementMode"></param>
        /// <param name="colorKey">The color key of the texture.</param>
        /// <param name="filter">A set of options controlling how the image is filtered.</param>
        /// <param name="mipFilter">A set of options controlling how mipmaps are filtered.</param>
        public TextureCreationParameters(int width, int height, int depth, int mipLevels, SurfaceFormat format, ResourceUsage resourceUsage, ResourceManagementMode resourceManagementMode, Color colorKey)
        {
            m_Width = width;
            m_Height = height;
            m_Depth = depth;
            m_MipLevels = mipLevels;
            m_Format = format;
            m_ResourceUsage = resourceUsage;
            m_ResourceManagementMode = resourceManagementMode;
            m_ColorKey = colorKey;
        }

        static TextureCreationParameters()
        {
            TextureCreationParameters.m_Default = new TextureCreationParameters(
                0, 0, 0, 0,
                SurfaceFormat.Color,
                ResourceUsage.None,
                ResourceManagementMode.Automatic,
                Color.TransparentBlack);
        }
        #endregion

        #region Operators
        /// <summary>
        /// Determines whether two instances of TextureCreationParameters are not equal.
        /// </summary>
        /// <param name="left">The object to the left of the inequality operator.</param>
        /// <param name="right">The object to the right of the inequality operator.</param>
        public static bool operator !=(TextureCreationParameters left, TextureCreationParameters right) 
        { 
            throw new NotImplementedException(); 
        }
        /// <summary>
        /// Determines whether two instances of TextureCreationParameters are equal.
        /// </summary>
        /// <param name="left">The object to the left of the equality operator.</param>
        /// <param name="right">The object to the right of the equality operator.</param>
        public static bool operator ==(TextureCreationParameters left, TextureCreationParameters right)
        { 
            throw new NotImplementedException(); 
        }
        #endregion

        #region Public Methods
        /// <summary>
        /// Determines whether the specified Object is equal to the TextureCreationParameters.
        /// </summary>
        /// <param name="obj">The Object to compare with the current TextureCreationParameters.</param>
        public override bool Equals(object obj)
        { 
            throw new NotImplementedException(); 
        }
        /// <summary>
        /// Gets the hash code for this instance.
        /// </summary>
        public override int GetHashCode()
        { 
            throw new NotImplementedException(); 
        }
        /// <summary>
        /// Returns a String that represents the current TextureCreationParameters.
        /// </summary>
        public override string ToString()
        { 
            throw new NotImplementedException(); 
        }
        #endregion
    }
}
